﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BonjourHotel.Core.Localization;
using BonjourHotel.Core.Configuration;

namespace BonjourHotel.Application.Controls.StatusBar
{
    public partial class ConnectedDatabase : System.Web.UI.UserControl
    {
        protected void Page_Init(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                string database = LocaleManager.GetLocaleString("StatusBar.ConnectedDatabase.Database");
                string datasource = new BonjourHotel.Model.BonjourHotelEntities().Connection.DataSource;
                lblDatabase.Text = String.Format("{0}: {1}", database, datasource);
            }
        }
    }
}